package com.yuju.order.service.impl;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yuju.common.core.dao.IBaseDao;
import com.yuju.common.core.service.AbstractBaseService;
import com.yuju.order.dao.IReserveRoomDao;
import com.yuju.order.dao.entity.ReserveRoom;
import com.yuju.order.model.ReserveRoomModel;
import com.yuju.order.service.IReserveRoomService;
import com.yuju.util.Utils;
/**
 * 
 * 类名：ReserveRoomServiceImpl  <br />
 *
 * 功能：
 *
 * @author : sunyl <br />
 * @Date : 2017年11月24日 上午9:37:41  <br />
 * @version : 1.1 <br />
 */
@Service
public class ReserveRoomServiceImpl extends AbstractBaseService<ReserveRoomModel,ReserveRoom,String> implements IReserveRoomService{
	@Autowired
	private IReserveRoomDao ReserveRoomDao;
	
	@Override
	public IBaseDao<ReserveRoomModel, ReserveRoom, String> getDao() {
		// TODO Auto-generated method stub
		return ReserveRoomDao;
	}
	@Override
	public int save(ReserveRoomModel model) {
		// 保存数据
		model.setId(Utils.getUUID());
		model.setGmtCreate(new Date());
		model.setGmtModified(new Date());
		int rows = super.save(model);
		return rows;
	}

}
